/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cxhd.dc.filter;

import java.io.File;
import java.io.FilenameFilter;

/**
 *
 * @author paul
 */
public class FileFilterImpl implements FilenameFilter {

    private String type;

    public FileFilterImpl(String type) {
        this.type = type;
    }

    @Override
    public boolean accept(File dir, String name) {
        if (name.toLowerCase().endsWith(this.type)) {
            return true;
        } else {
            return false;
        }
    }
}
